
const store = {
  namespaced: true,
  state: {
      showRelativeEmployeeModal: false, // 控制关联人员弹框是否显示
      showRolesModal: false, // 控制关联角色弹框是否显示
      selectedRelativeEmployees: [], // 选择的 关联人员
      selectedOrgStruct: null,
      selectedEmployee: null        // 选择的员工 用于关联角色
  },
  mutations: { // 同步操作
      toggleRelativeEmployeeModal(state, show) {
        state.showRelativeEmployeeModal = show;
      },
      toggleRelativeRolesModal(state, show) {
          state.showRolesModal = show;
      },
      setSelectedRelativeEmployees(state, employees) {
          state.selectedRelativeEmployees = employees;
      },
      setSelectedOrgStruct(state, orgStruct) {
          state.selectedOrgStruct = orgStruct;
      },
      setSelectedEmployee(state, employee) {
          state.selectedEmployee = employee;
      }
  },
  actions: { // 异步操作
    
  }
}

export default store